const GetLineOption = (TitleText,XData,Y1Data,Y2Data,Y1Title,Y2Title) => {
  return {
    title: {
      text: TitleText,
      textStyle: {
        fontSize: '14px;',
        color:'#2781D9'
      }
    },
    xAxis: {
      data: XData,
      axisTick:{
        "show":false
      }
    },
    yAxis: {
      show: false
    },
    grid: {  // 布满div
      top:"20px",
      left:"20px",
      right:"20px",
      bottom:"30px"
    },
    legend: {
      orient: 'horizontal',
      x:'right',
      y:'top',
      itemGap: 10,
      data: [
        {
        name: Y1Title,
        icon: 'roundRect',
        textStyle: {fontWeight: '500', color: '#a8a9bc'}
        },
        {
        name: Y2Title,
        icon: 'roundRect',
        textStyle: {fontWeight: '500', color: '#a8a9bc'}
        }
      ]
    },
    tooltip: { // 鼠标悬浮提示框显示 X和Y 轴数据
      backgroundColor: 'rgba(32, 33, 36,.7)',
      borderColor: 'rgba(32, 33, 36,0.20)',
      borderWidth: 1,
      textStyle: { // 文字提示样式
        color: '#fff',
        fontSize: '12'
      },
    },
    series: [
      {
        name:Y2Title,
        symbolSize: 7,   //设定实心点的大小
        data: Y2Data,
        type: 'line',
        smooth: true,
        lineStyle: {
          color: '#aa67f0',
        },
        areaStyle: {
          color: '#aa67f0',
          opacity: 0.3
        },
        itemStyle : {
          normal : {
            color:'#aa67f0'
          }
        }
      },
      {
        name:Y1Title,
        symbolSize: 7,   //设定实心点的大小
        data: Y1Data,
        type: 'line',
        smooth: true,
        lineStyle: {
          color: '#4969b9',
        },
        areaStyle: {
          color: '#4969b9',
          opacity: 0.2
        },
        itemStyle : {
          normal : {
            color:'#4969b9'
          }
        }
      }
    ]
  };
}

export default GetLineOption